package com.ucap.weking.guangan.base;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

import com.ucap.weking.guangan.R;


/**
 * Created by weking on 2017/10/17.
 */

public abstract class BaseFragment extends Fragment {


    public FrameLayout flContent;
    public Activity homeActivity;


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View inflate = inflater.inflate(R.layout.fragemnt_base, container, false);
        flContent = (FrameLayout) inflate.findViewById(R.id.fl_content);
        return inflate;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        homeActivity = getActivity();
        intiView();
        setData();

    }

    /**
     * 设置数据
     */
    public abstract void setData();

    /**
     * 初始化布局
     */
    public abstract void intiView();


}
